﻿using System;
using System.Diagnostics;

namespace Runtime.Services.BattleAttack {

    /// <summary>
    /// 战斗攻击ID
    /// </summary>
    [DebuggerStepThrough]
    [DebuggerNonUserCode]
    public readonly struct DFR_BattleAttackID {

        public static readonly DFR_BattleAttackID Empty = new();

        /// <summary>
        /// GUID
        /// </summary>
        public Guid GUID { get; init; }

        public override bool Equals(object obj) {
            if (obj is DFR_BattleAttackID other) {
                return other.GUID == GUID;
            }
            return false;
        }

        public override int GetHashCode() => GUID.GetHashCode();

        public override string ToString() => $"[{nameof(DFR_BattleAttackID)}({GUID})]";

        public static bool operator ==(DFR_BattleAttackID left, DFR_BattleAttackID right) => left.Equals(right);
        public static bool operator !=(DFR_BattleAttackID left, DFR_BattleAttackID right) => !left.Equals(right);
    }
}
